VERSION 5.00
Begin VB.Form frmMsgBox 
   Caption         =   "Message"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer timerShow 
      Enabled         =   0   'False
      Left            =   3960
      Top             =   960
   End
   Begin VB.Timer timerUnload 
      Enabled         =   0   'False
      Left            =   3960
      Top             =   240
   End
   Begin VB.TextBox textMsg 
      Height          =   2295
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      TabStop         =   0   'False
      Text            =   "frmMsgBox.frx":0000
      Top             =   120
      Width           =   3375
   End
End
Attribute VB_Name = "frmMsgBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
'


Public Property Let Message(ByVal pMessage As String)
    ' Debug.Print Now, "Message 0"
    textMsg.Text = pMessage
    timerShow.Interval = 1
    timerShow.Enabled = True
    ' Debug.Print Now, "Message 1"
End Property

Public Property Let TimeOut(lngMS As Long)
    timerUnload.Interval = lngMS
    timerUnload.Enabled = True
End Property


Private Sub Form_Resize()

    ' Debug.Print Now, "Resize 0"
    textMsg.Height = Me.Height - 2 * textMsg.Top - 600
    textMsg.Width = Me.Width - 2 * textMsg.Left - 200
    ' Debug.Print Now, "Resize 1"
    
End Sub


Private Sub timerShow_Timer()
    On Error GoTo ErrorExit
    ' Debug.Print Now, "Show 0"
    timerShow.Enabled = False
    Me.Show
    ' Debug.Print Now, "Show 1"
    Exit Sub

ErrorExit:
    ' Usually modality problem
    On Error Resume Next
    Unload Me
    
End Sub

Private Sub timerUnload_Timer()
    Unload Me
End Sub
